<header class='s-header'>
    <div class='s-header-logo'>
        <a href="../index.html">
            <img src="./assets/image/topLogo.png" onerror="error(this,'../assets/image/topLogo.png')" alt="logo" width="100%">
        </a>
    </div>
    <div class='s-header-search'>
        <div class='s-search'>
            <input type="text" placeholder="请输入关键词" class='s-search-input s-search-input-bd'>
            <button class='s-search-button s-search-button-bg iconfont icon-suosou pointer'>
            </button>
        </div>
    </div>
    <div class='s-header-user'>
        <!-- 已登录 -->
        <div class='s-logined' >
            <p class='s-search-font-color s-logined-menu pointer'>
                <span class='iconfont icon-yonghu'></span><span class='s-logined-user'>admin</span>
                <div class='s-logined-menu-item pointer'>
                    <span class='top-jiao'></span>
                    <p><a href='../template/setting.html'>个人设置</a></p>
                    <p><a href='../template/login.html'>退出</a></p>
                </div>
            </p>
        </div>
        <!-- 未登录 -->
        <div class='notLogin' style='display:none;'>
            <span class='login pointer'><a href='login.html'></a>登录</span>
            <span class='sigin pointer'>注册</span>
        </div>
    </div>
</header>
<script>
    function error(e,url){
        e.src=url;
    }
    ;(function(){
        var login=true;//控制是否登录
        if(login){
            $('.s-logined').show();
            $('.notLogin').hide();
        }else{
            $('.s-logined').hide();
            $('.notLogin').show();
        }
        var show=false;
        $('.s-logined-menu').on('click',function(){
            show=!show;
            if(show){
                $('.s-logined-menu-item').show();
            }else{
                $('.s-logined-menu-item').hide();
            }
        })
    })()
</script>